Skip to content

[PWGUD] Use const& and std::move to avoid copies - #17713

Merged
amatyja merged 1 commit into
AliceO2Group:masterfrom
vkucera:const-PWGUD
Sep 2, 2026
Merged

[PWGUD] Use const& and std::move to avoid copies#17713
amatyja merged 1 commit into
AliceO2Group:masterfrom
vkucera:const-PWGUD

Conversation

@vkucera

@vkucera vkucera commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Mostly done automatically by Clang-Tidy.

Mostly done automatically by Clang-Tidy.
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

O2 linter results: ❌ 1477 errors, ⚠️ 1111 warnings, 🔕 6 disabled

@github-actions github-actions Bot added the pwgud label Sep 1, 2026
@github-actions github-actions Bot changed the title Use const& and std::move to avoid copies [PWGUD] Use const& and std::move to avoid copies Sep 1, 2026
@vkucera
vkucera marked this pull request as ready for review September 1, 2026 15:54

@amatyja amatyja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for corrections. UD is fine with them.

@amatyja
amatyja enabled auto-merge (squash) September 1, 2026 16:42

@amatyja amatyja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thnak you for corrections. UD part is fine.

@alibuild

alibuild commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/staging for fcb3ad0 at 2026-09-02 02:01:

## sw/BUILD/O2Physics-latest/log
c++: fatal error: Killed signal terminated program cc1plus
c++: fatal error: Killed signal terminated program cc1plus
c++: fatal error: Killed signal terminated program cc1plus
ninja: build stopped: subcommand failed.

Full log here.

@alibuild

alibuild commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Error while checking build/O2Physics/code-check for fcb3ad0 at 2026-09-02 02:06:

## sw/BUILD/O2Physics-code-check-latest/log
--
========== List of issues found ==========
++ echo 'Found 183 errors and 2576 warnings.'
Found 183 errors and 2576 warnings.
++ [[ 183 -gt 0 ]]
++ cat /sw/BUILD/0db844a18c9e2da6e3833b5c731b0a55899cf634/O2Physics-code-check/errors.txt
PWGUD/AQC/udQC.cxx:54:8: error: constructor does not initialize these fields: maxdEdxTPC, maxdEdxTOF [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:597:11: error: variable 'ampFV0A' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:597:20: error: variable 'ampFT0A' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:597:29: error: variable 'ampFT0C' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:597:38: error: variable 'ampFDDA' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:597:47: error: variable 'ampFDDC' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:657:11: error: variable 'ampFV0A' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:657:20: error: variable 'ampFT0A' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:657:29: error: variable 'ampFT0C' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:657:38: error: variable 'ampFDDA' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/AQC/udQC.cxx:657:47: error: variable 'ampFDDC' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:41:1: error: constructor does not initialize these fields: mnumPart, mcutPID, mcutDetector, mcutType, mcutApply, mptMin, mptMax, mdetValuemin, mdetValuemax [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:52:3: error: 'mnumPart' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:53:3: error: 'mcutPID' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:54:3: error: 'mcutDetector' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:55:3: error: 'mcutType' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:56:3: error: 'mcutApply' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:57:3: error: 'mptMin' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:58:3: error: 'mptMax' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:59:3: error: 'mdetValuemin' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:60:3: error: 'mdetValuemax' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:299:7: error: variable 'cnt' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:423:3: error: 'fPDG' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.cxx:527:44: error: Division by zero [clang-analyzer-core.DivideZero,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.h:260:5: error: 'mtrkinds' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.h:387:9: error: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.h:399:9: error: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case,-warnings-as-errors]
PWGUD/Core/DGPIDSelector.h:413:111: error: repeated branch body in conditional chain [bugprone-branch-clone,-warnings-as-errors]
PWGUD/Core/DGSelector.h:36:18: error: 'fPDG' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/UDFSParser.cxx:29:3: error: 'fisActive' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/UDFSParser.cxx:48:7: error: variable 'bucket' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/Core/UDFSParser.cxx:159:9: error: variable 'token' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/Core/UDGoodRunSelector.cxx:28:1: error: constructor does not initialize these fields: misActive [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGUD/Core/UDGoodRunSelector.cxx:113:36: error: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay,-warnings-as-errors]
PWGUD/Core/UDGoodRunSelector.cxx:121:5: error: Opened stream never closed. Potential resource leak [clang-analyzer-unix.Stream,-warnings-as-errors]
PWGUD/Core/UDGoodRunSelector.cxx:127:7: error: variable 'runNumber' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/Core/UDGoodRunSelector.h:24:3: error: constructor does not initialize these fields: misActive [cppcoreguidelines-pro-type-member-init,-warnings-as-errors]
PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h:90:11: error: variable 'deltaPhi' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h:95:11: error: variable 'part1' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/Core/UPCJpsiCentralBarrelCorrHelper.h:95:18: error: variable 'part2' is not initialized [cppcoreguidelines-init-variables,-warnings-as-errors]
PWGUD/Core/decayTree.cxx:58:3: error: 'fpidCuts' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
PWGUD/Core/decayTree.cxx:96:3: error: 'fRnames' should be initialized in a member initializer of the constructor [cppcoreguidelines-prefer-member-initializer,-warnings-as-errors]
[0 more errors; see full log]

Full log here.

@amatyja
amatyja merged commit 1c1042d into AliceO2Group:master Sep 2, 2026
12 of 16 checks passed
@vkucera
vkucera deleted the const-PWGUD branch September 2, 2026 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

3 participants